# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=gping
pkgver=1.16.0
pkgrel=0
pkgdesc="Ping, but with a graph"
url="https://github.com/orf/gping"
license="MIT"
arch="all"
makedepends="cargo cargo-auditable"
source="https://github.com/orf/gping/archive/gping-v$pkgver/gping-$pkgver.tar.gz"
builddir="$srcdir/gping-gping-v$pkgver"
options="net" # fetch dependencies

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --frozen --release
}

check() {
	cargo test --frozen
}

package() {
	install -Dm755 target/release/$pkgname -t "$pkgdir"/usr/bin/
}

sha512sums="
54b1f4a18cb3a3ad51d3dec0f1b0f8eaacaa084d1be6d4d70a2e5224b26a1032eacceb49c6755580d1370bc30a8248557c06ee3f51c5d6cf1b381cee448b8eae  gping-1.16.0.tar.gz
"
